<template>
	<view>
		<view class="top tac fw">
			<text>填写真实信息，已有</text>
			<text class="color">{{5}}万</text>
			<text>人成功放款</text>
		</view>
		<view class="messageBar disb aic">
			<text>姓名</text>
			<u--input
			    placeholder="请输入"
				inputAlign='right'
				border='none'
			    v-model="user.name"
			></u--input>
		</view>
		<view class="messageBar ">
			<view class="disb aic">
				<text>性别</text>
				<view class="select disp aic">
					<text class="color9">{{getSex(user.sex)}}</text>
					<image src="../../static/images/preat/right.png" mode=""></image>
				</view>
			</view>
			<view class="selectBar disp">
				<view :class="user.sex==1?'btn tac selectIt':'btn tac'" @click="user.sex=1">男</view>
				<view :class="user.sex==2?'btn tac selectIt':'btn tac'" @click="user.sex=2">女</view>
				<view :class="user.sex==3?'btn tac selectIt':'btn tac'" @click="user.sex=3">未知</view>
			</view>
		</view>
		<view class="messageBar disb aic">
			<text>年龄</text>
			<u--input
			    placeholder="请输入"
				inputAlign='right'
				border='none'
			    v-model="user.age"
			></u--input>
		</view>
		<view class="messageBar ">
			<view class="disb aic">
				<text>户籍</text>
				<view class="select disp aic">
					<text class="color9">{{user.censusRegister}}</text>
					<image src="../../static/images/preat/right.png" mode=""></image>
				</view>
			</view>
			<view class="selectBar disp">
				<view :class="user.censusRegister=='重庆本地'?'btn tac selectIt':'btn tac'" @click="user.censusRegister='重庆本地'">重庆本地</view>
				<view :class="user.censusRegister=='外地户籍'?'btn tac selectIt':'btn tac'" @click="user.censusRegister='外地户籍'">外地户籍</view>
			</view>
		</view>
		<view class="messageBar">
			<view class="disb aic">
				<text>户口</text>
				<view class="select disp aic">
					<text class="color9">{{user.registeredHk}}</text>
					<image src="../../static/images/preat/right.png" mode=""></image>
				</view>
			</view>
			<view class="selectBar disp">
				<view :class="user.registeredHk=='农村户口'?'btn tac selectIt':'btn tac'" @click="user.registeredHk='农村户口'">农村户口</view>
				<view :class="user.registeredHk=='城市户口'?'btn tac selectIt':'btn tac'" @click="user.registeredHk='城市户口'">城市户口</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"userInfo",
		props:{
			user:{
				type:Object,
				default:()=>{ return {} }
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			//性别
			getSex(i){
				if(i==1){
					return '男'
				}
				if(i==2){
					return '女'
				}
				if(i==3){
					return '未知'
				}
			}
		}
	}
</script>

<style lang="scss">
.top{
	line-height: 80rpx;
	background-color: #d8e6ff;
	color: blue;
}
.messageBar{
	min-height: 80rpx;
	line-height: 80rpx;
	padding: 0 30rpx;
	margin-bottom: 10rpx;
	background-color: #fff;
	.select{
		image{
			width: 20rpx;
			height: 30rpx;
			margin-left: 10rpx;
		}
	}
	.selectBar{
		padding-bottom: 20rpx;
		.selectIt{
			background-color: #0055ff;
			color: #fff;
		}
	}
	.btn{
		width: 150rpx;
		line-height: 60rpx;
		margin-right: 10rpx;
		border-radius: 30rpx;
		background-color: #ccc;
	}
}
</style>